package com.itheima.springbootwebtlias.aspect;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Slf4j
@Aspect
@Component
public class AspectExecution {
/*方案一*/
   //@Pointcut("execution(void com.itheima.springbootwebtlias.service.impl.*ServiceImpl.remove*(*))")
    /*方案二*/
   @Pointcut("@annotation(com.itheima.springbootwebtlias.anno.LogOperation)")
    public void ak(){

    }

    @Before("ak()")
    public void before(){
        log.info("before......ak切面执行了");
    }
}
